<#include "../../../common/nolayout.ftl"/>
<@html  js_=['life/send/email_template_edit.js']>
<body class="childrenBody">
<form class="layui-form layui-row layui-col-space10" action="${root}/email/template/edit/${template.id}" method="post" id="listForm">
    <input type="hidden" name="content" id="content"/>
    <div class="layui-col-md9 layui-col-xs12">
        <div class="layui-row layui-col-space10">
            <div class="layui-col-md9 layui-col-xs9">
                <div class="layui-form-item magt3">
                    <label class="layui-form-label">标题</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" value="${template.title}" class="layui-input title"  placeholder="请输入标题">
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-form-item magb0">
            <label class="layui-form-label">内容</label>
            <div class="layui-input-block">
                <textarea class="layui-textarea " id="contents">${template.content}</textarea>
            </div>
        </div>

        <div class="layui-col layui-col-xs12">
            <div class="layui-form-item magt3">
                <label class="layui-form-label">类型</label>
                <div class="layui-input-block">
                    <#list EMAIL_TEMPLATE_TYPE_MAP?keys as key>
                        <p>
                            <input type="radio" name="type" value="${key}" title="${EMAIL_TEMPLATE_TYPE_MAP[key]}" lay-skin="primary"
                            <#if template.type??&&template.type==key>checked</#if>/>
                        </p>
                    </#list>
                </div>
            </div>
        </div>

        <div class="layui-form-item magb0">
            <label class="layui-form-label"></label>
            <a class="layui-btn layui-btn-sm" lay-filter="editEmailTemplate" lay-submit><i class="layui-icon">&#xe609;</i>保存修改</a>
        </div>
    </div>
</form>
</body>
</@html>